from app import db


class Tmpscore(db.Model):
    __tablename__ = 'tbl_tmpscore'
    Stu_id = db.Column(db.String(10), primary_key=True)
    Cos_id = db.Column(db.String(10), primary_key=True, nullable=False)
    Score = db.Column(db.Float, nullable=False)

    def to_json(self):
        return {
            "Stu_id": self.Stu_id,
            "Cos_id": self.Cos_id,
            "Score": self.Score,
        }
